#include<iostream>
#include<cstring>
using namespace std;

struct box
{
    char maker[40];
    float height;
    float wigth;
    float length;
    float volume;
};

void pass_by_value(box);

void pass_by_address(box*);

int main()
{
    box bx;
    cout << "Enter the name of box:";
    cin.getline(bx.maker,40);
    cout << "Enter the height of box:";
    cin >> bx.height;
    cout << "Enter the width of box:";
    cin >> bx.wigth;
    cout << "Enter the length of box:";
    cin >> bx.length;
    pass_by_address(&bx);
    pass_by_value(bx);
    cout << "After the address transmission operation, the volume of box is:" << bx.volume;

    return 0;
}

void pass_by_value(box a)
{
    int len = int(strlen(a.maker));
    for ( int i = 0; i < len; i++)
    cout << a.maker[i];
    cout << endl;
    cout << a.height << endl << a.wigth << endl << a.length << endl << a.volume <<
}

void pass_by_address(box* b)
{
    b->volume = b->height * b->wigth * b->length;
}

